JAMS Developer Guide
Set a Variable using C Sharp

In some cases, users may wish to set a JAMS variable using C# code. To do this, customize the following code to suit the given scenario.

Set a Variable Using C #
Copy Code
///<summary>
///Contains Global variables for project.
///</summary>

public static class GlobalVar
{
    /// <summary>
    /// Global variable that is constant.
    /// </summary>
    public const string GlobalString = "Important Text";
 
    /// <summary>
    /// Static value protected by access routine.
    /// </summary>
    static int _globalValue;
 
    /// <summary>
    /// Access routine for global variable.
    /// </summary>

    public static int GlobalValue
    {
        get
        {
            return _globalValue;
        }
        set
        {
            _globalValue = value;
        }
    }
}

 

 


Copyright © Fortra, LLC and its group of companies.
All trademarks and registered trademarks are the property of their respective owners.